package MyHashNet;


import java.util.TreeSet;

public class Student2Demo {
    public static void main(String[] args) {
        TreeSet<Student2> ts = new TreeSet<>();
        Student2 s1 = new Student2("zhangsan", 23, 40, 50, 60);
        Student2 s2 = new Student2("lisi", 23, 40, 50, 60);
        Student2 s3 = new Student2("wangwu", 25, 10, 20, 30);
        Student2 s4 = new Student2("ee", 22, 10, 20, 30);
        ts.add(s1);
        ts.add(s2);
        ts.add(s3);
        ts.add(s4);
        for (Student2 t : ts) {
            System.out.println(t.getChinese() + t.getMath() + t.getEnglish());
            System.out.println(t);
        }
    }
}
